package day24;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
//通过IO流模拟Scanner类的next()获取字符串内容
// 和nextInt()获取整形内容
//public String myNext(){}
//public int myNextInt(){}
public class Homework1 {
    static InputStream is=System.in;
    static InputStreamReader isr=new InputStreamReader(is);
    static BufferedReader br=new BufferedReader(isr);
    public static void main(String[] args) throws IOException {
        String result=myNext();
        int num=myNextInt();
        System.out.println("输入的字符串为:"+result);
        System.out.println("输入的数字为:"+num);

    }
    public static String myNext() throws IOException {
        System.out.print("请输入一个字符串:");
        String s=br.readLine();
        return s;
    }

    public static int myNextInt() throws IOException {
       System.out.print("请输入一个数字:");
       int num = Integer.parseInt(br.readLine());
       return num;
    }
}
